using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Rss;

namespace LiveExpo.Activities
{
    [Designer(typeof(ConsoleActivityDesigner), typeof(IDesigner))]
    public partial class GetListingsByCategoryKeywordLocationV2: Activity
	{
		public GetListingsByCategoryKeywordLocationV2()
		{
			InitializeComponent();
		}


        public static DependencyProperty SiteIDProperty = System.Workflow.ComponentModel.DependencyProperty.Register("SiteID", typeof(int), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("This is the site you wish to query against. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public int SiteID
        {
            get
            {
                return ((int)(base.GetValue(GetListingsByCategoryKeywordLocationV2.SiteIDProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.SiteIDProperty, value);
            }
        }

        public static DependencyProperty ApplicationKeyProperty = System.Workflow.ComponentModel.DependencyProperty.Register("ApplicationKey", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("This is the Application Key for your application, provided by LiveExpo. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string ApplicationKey
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.ApplicationKeyProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.ApplicationKeyProperty, value);
            }
        }





        public static DependencyProperty PageProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Page", typeof(int), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("Page number. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public int Page
        {
            get
            {
                return (int)(base.GetValue(GetListingsByCategoryKeywordLocationV2.PageProperty));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.PageProperty, value);
            }
        }
        public static DependencyProperty PageSizeProperty = System.Workflow.ComponentModel.DependencyProperty.Register("PageSize", typeof(int), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("Listings per page. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public int PageSize
        {
            get
            {
                return (int)(base.GetValue(GetListingsByCategoryKeywordLocationV2.PageSizeProperty));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.PageSizeProperty, value);
            }
        }


        public static DependencyProperty OrderByProperty = System.Workflow.ComponentModel.DependencyProperty.Register("OrderBy", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("One of CreatedDate,Price,Distance,EventStartDate ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string OrderBy
        {
            get
            {
                return (string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.OrderByProperty));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.OrderByProperty, value);
            }
        }
        public static DependencyProperty OrderAscendingProperty = System.Workflow.ComponentModel.DependencyProperty.Register("OrderAscending", typeof(bool), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("Direction of ordering. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public bool OrderAscending
        {
            get
            {
                return (bool)(base.GetValue(GetListingsByCategoryKeywordLocationV2.OrderAscendingProperty));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.OrderAscendingProperty, value);
            }
        }

        public static DependencyProperty CategoryProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Category", typeof(int), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("This is the Application Key for your application, provided by LiveExpo. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public int Category
        {
            get
            {
                return ((int)(base.GetValue(GetListingsByCategoryKeywordLocationV2.CategoryProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.CategoryProperty, value);
            }
        }

        public static DependencyProperty KeywordProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Keyword", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("This is the Application Key for your application, provided by LiveExpo. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string Keyword
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.KeywordProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.KeywordProperty, value);
            }
        }


        #region Address Properties

    

        public static DependencyProperty CityProperty = System.Workflow.ComponentModel.DependencyProperty.Register("City", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));
        [Description("This is the city to check GetListingsByCategoryKeywordLocationV2 for. ")]
        [Category("Address")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string City
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.CityProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.CityProperty, value);
            }
        }

        public static DependencyProperty StateProperty = System.Workflow.ComponentModel.DependencyProperty.Register("State", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));
        [Description("This is the state to check GetListingsByCategoryKeywordLocationV2 for. ")]
        [Category("Address")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string State
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.StateProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.StateProperty, value);
            }
        }

        public static DependencyProperty PostalCodeProperty = System.Workflow.ComponentModel.DependencyProperty.Register("PostalCode", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));
        [Description("This is the postal code to check GetListingsByCategoryKeywordLocationV2 for. ")]
        [Category("Address")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string PostalCode
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.PostalCodeProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.PostalCodeProperty, value);
            }
        }

        public static DependencyProperty CountryProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Country", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));
        [Description("This is the country to find listings in.")]
        [Category("Address")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string Country
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.CountryProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.CountryProperty, value);
            }
        }


        public static DependencyProperty TransactionTypeProperty = System.Workflow.ComponentModel.DependencyProperty.Register("TransactionType", typeof(string), typeof(GetListingsByCategoryKeywordLocationV2));
        [Description("Transaction type (Sell, Swap)- can be retrieved form GetCategories. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public string TransactionType
        {
            get
            {
                return ((string)(base.GetValue(GetListingsByCategoryKeywordLocationV2.TransactionTypeProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.TransactionTypeProperty, value);
            }
        }
        #endregion

        public static DependencyProperty MaxDistanceProperty = System.Workflow.ComponentModel.DependencyProperty.Register("MaxDistance", typeof(float), typeof(GetListingsByCategoryKeywordLocationV2));
        [Description("This is the maximum distance (in miles) to return listings. ")]
        [Category("Miscellaneous")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public float MaxDistance
        {
            get
            {
                return ((float)(base.GetValue(GetListingsByCategoryKeywordLocationV2.MaxDistanceProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.MaxDistanceProperty, value);
            }
        }

        public static DependencyProperty ResultProperty = System.Workflow.ComponentModel.DependencyProperty.Register("Result", typeof(RssFeed), typeof(GetListingsByCategoryKeywordLocationV2));

        [Description("This is list of categories. ")]
        [Category("Result")]
        [Browsable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public RssFeed Result
        {
            get
            {
                return ((RssFeed)(base.GetValue(GetListingsByCategoryKeywordLocationV2.ResultProperty)));
            }
            set
            {
                base.SetValue(GetListingsByCategoryKeywordLocationV2.ResultProperty, value);
            }
        }




        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {



            //
            // NOTE: Use static method to trigger system to start up
            //

            LiveExpoProxy proxy = new LiveExpoProxy();
            Result = proxy.GetListingsByCategoryKeywordLocationV2(SiteID, ApplicationKey, Page, PageSize, OrderBy, OrderAscending, Category, Keyword,City,State,PostalCode,Country, MaxDistance, TransactionType);


            return base.Execute(executionContext);

        }
    
    
    
    }
}
